package com.itheima.homework04;

import java.util.Scanner;
import java.util.StringJoiner;

public class Test01 {
    public static void main(String[] args) {
        //创建键盘输入对象
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入年龄和身高：（年龄是整数，身高是小数，中间使用逗号分割）");
        StringJoiner sj = new StringJoiner(",");
        String s = sc.next();
        String[] sArr = s.split(",");
        int age = Integer.parseInt(sArr[0]);
        double height = Double.parseDouble(sArr[1]);
        System.out.println("转成整数后的年龄是："+age);
        System.out.println("转成小数后的身高是："+height);
    }
}
